package com.sky.mapper;


import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    //依据菜品id获取
    Integer getSetmealIdByDishIds(List<Long> ids);

    //查询套餐中含有某菜品的套餐id
    List<Long> getSetmealIdByDishIdsObj(List<Long> dishIds);

    //添加套餐菜品
    void addSetmealDish(List<SetmealDish> setmealDish);

    @Select("select * from setmeal_dish where dish_id=#{id}")
    List<SetmealDish> getSetmealDishBySetmealId(Long id);

    @Delete("delete from setmeal_dish where dish_id=#{id}")
    void deleteBySetmealId(Long id);
}
